﻿using System;

namespace JenkinsView
{
    public class JenkinsServer
    {
        public string SvrName;
        public string Url;
        public string User;
        public string Password;
    }

    [NoCompile]
    public class JenkinsServerData
    {
        public JenkinsJobData[] Jobs;
    }

    [NoCompile]
    public class JenkinsJobData
    {
        public string Name;
        public string Url;
        public string Color;
        public bool Buildable;
        public HealthReportData[] HealthReport;
        public BuildData[] Builds;
    }

    [NoCompile]
    public class HealthReportData
    {
        public string Description;
        public string IconUrl;
        public int Score;
    }

    [NoCompile]
    public class BuildData
    {
        public int Number;
        public string Url;
        public string Result;
        public ActionData[] Actions;
        public ChangeSetData ChangeSet;
    }

    [NoCompile]
    public class ActionData
    {
        public CauseData[] Causes;
    }

    [NoCompile]
    public class CauseData
    {
        public string ShortDescription;
        public string UserName;
    }

    [NoCompile]
    public class ChangeSetData
    {
        public ItemData[] Items;
    }

    [NoCompile]
    public class ItemData
    {
        public string User;
        public string Msg;
        public string Date;
    }
}
